#ifndef _OOD3D9RENDER_H_
#define _OOD3D9RENDER_H_

#include "ooengine.h"

//------------------------------------------------------------------------
class ooDisplayWindow;
class ooImage;

//------------------------------------------------------------------------
class ooD3D9Render
{
public:
	ooD3D9Render();
	virtual ~ooD3D9Render();

	void					focusWindow(ooDisplayWindow* window);
	void					setupRender();

	void					tick(float elasped);

	void					beginFrame();
	void					endFrame();
	void					present();

	void					drawImage(const ooImage* image);

	LPDIRECT3DDEVICE9		getDevice() const;

protected:
	void					_init();

protected:
	bool					m_windowed;
	bool					m_setup;
	ooDisplayWindow*		m_focus;

	LPDIRECT3D9				m_d3d;
	LPDIRECT3DDEVICE9		m_device;
	D3DPRESENT_PARAMETERS	m_params;

};

#endif